/* All codes are generated by STATA 17.0 */

/* Codes for Table 3 and Table Appendix A1 */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] , vce(cluster county) cformat(%9.3fc)
esttab, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)
eststo clear

/* Codes Table 4 and Table Appendix A2 */
/* High teleworkability */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if industry==1, vce(cluster county) cformat(%9.3fc)

/* Medium teleworkability */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if industry==2, vce(cluster county) cformat(%9.3fc)

/* Low teleworkability */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if industry==3, vce(cluster county) cformat(%9.3fc)

/* Very low teleworkability */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if industry==4, vce(cluster county) cformat(%9.3fc)

esttab, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)
eststo clear

/* Codes for Table 5 and Table Appendix C1 */
/* Female */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if female==1, vce(cluster county) cformat(%9.3fc)

/* Male */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if female==0, vce(cluster county) cformat(%9.3fc)

esttab, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)
eststo clear

/* Codes for Table 6 and Table Appendix C2 */
set matsize 11000
eststo: quietly reg notlab i.female##c.phase1 i.child11##c.phase1 i.age2130##c.phase1  ///
i.age3140##c.phase1 i.age4150##c.phase1 i.age5160##c.phase1  ///
i.age6170##c.phase1 i.marry##c.phase1 i.lesshs##c.phase1 i.hs##c.phase1  ///
i.somecol##c.phase1 i.col##c.phase1 i.hispanic##c.phase1  ///
i.black##c.phase1 i.asian##c.phase1 i.othrace##c.phase1  ///
i.immig##c.phase1 i.lowinc##c.phase1 i.midinc##c.phase1  ///
i.female##c.phase2 i.child11##c.phase2 i.age2130##c.phase2  ///
i.age3140##c.phase2 i.age4150##c.phase2 i.age5160##c.phase2  ///
i.age6170##c.phase2 i.marry##c.phase2 i.lesshs##c.phase2 i.hs##c.phase2  ///
i.somecol##c.phase2 i.col##c.phase2 i.hispanic##c.phase2  ///
i.black##c.phase2 i.asian##c.phase2 i.othrace##c.phase2  ///
i.immig##c.phase2 i.lowinc##c.phase2 i.midinc##c.phase2  ///
i.female##c.phase3 i.child11##c.phase3 i.age2130##c.phase3  ///
i.age3140##c.phase3 i.age4150##c.phase3 i.age5160##c.phase3  ///
i.age6170##c.phase3 i.marry##c.phase3 i.lesshs##c.phase3 i.hs##c.phase3  ///
i.somecol##c.phase3 i.col##c.phase3 i.hispanic##c.phase3  ///
i.black##c.phase3 i.asian##c.phase3 i.othrace##c.phase3  ///
i.immig##c.phase3 i.lowinc##c.phase3 i.midinc##c.phase3  ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] if immig==0, vce(cluster county) cformat(%9.3fc)

esttab, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)
eststo clear

/* Codes for Table Appendix B1 */
/* With houeshold resposibilities */
xtset n month2
eststo: quietly reg notlab i.female i.child11 i.age2130  ///
i.age3140 i.age4150 i.age5160  i.age6170 i.marry i.lesshs i.hs  ///
i.somecol i.col i.hispanic  i.black i.asian i.othrace  ///
i.immig i.lowinc i.midinc  ///
l.i.health4 l.i.hhrespond4 l.i.laborcon4 l.i.othreasons4 ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] , vce(cluster county) cformat(%9.3fc)

/* With child care and family resposibilities */
xtset n month2
eststo: quietly reg notlab i.female i.child11 i.age2130  ///
i.age3140 i.age4150 i.age5160  i.age6170 i.marry i.lesshs i.hs  ///
i.somecol i.col i.hispanic  i.black i.asian i.othrace  ///
i.immig i.lowinc i.midinc  ///
l.i.health4 l.i.child l.i.famres l.i.laborcon4 l.i.othreasons4 ///
per_covid_case i.county i.month i.occ [pweight=wtfinl] , vce(cluster county) cformat(%9.3fc)
esttab, b(3) se(3) star(* 0.10 ** 0.05 *** 0.01)
